package com.tongjie.hotelbooking.order.entity;

import com.tongjie.hotelbooking.user.entity.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "hb_order_consulting")
public class OrderConsulting implements Serializable {

    private static final long serialVersionUID = -4816446878839770450L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "order_id")
    private Order order;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "merchant_user_id")
    private User merchant;

    @Column
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;


}
